from multiprocessing import Process
import time
import os

def run_proc(name, age, **kwargs):
    while True:
        print("子进程, pid = %d, name = %s, age = %d " % (os.getpid(), name, age))
        print(kwargs)
        time.sleep(1)

if __name__ == '__main__':
    p = Process(target=run_proc, args=("test", 11), kwargs={"k1":1, 'k2':2})
    p.start()

    # 终止子进程
    #time.sleep(10)
    #p.terminate()

    #p.join(5)
